<extend name="layout/application"/>
<block name="css">
    <link rel="stylesheet" href="/vendor/markdown/css/editormd.min.css"/>
</block>
<block name="content">
    <div class="admin-content">
        <div class="am-cf am-padding">
            <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">新增课题章节</strong> /
                <small>Create A New Chapter</small>
            </div>
        </div>
        <hr>
        <div class="am-g">
            <div class="am-u-sm-12 am-u-md-12">
                <form class="am-form" action="/admin/chapters/save?course_id={{$id}}" method="post">
                    <div class="am-tabs am-margin" data-am-tabs>
                        <ul class="am-tabs-nav am-nav am-nav-tabs">
                            <li class="am-active"><a href="#tab1">通用信息</a></li>
                            <li><a href="#tab2">章节描叙</a></li>
                        </ul>

                        <div class="am-tabs-bd">
                            <div class="am-tab-panel am-fade am-in am-active" id="tab1">
                                <div class="am-g am-margin-top">
                                    <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                        章节名称
                                    </div>
                                    <div class="am-u-sm-8 am-u-md-5">
                                        <input type="text" class="am-input-sm" name="title">
                                    </div>
                                    <div class="am-hide-sm-only am-u-md-5">*必填，不可重复</div>
                                </div>

                                <div class="am-g am-margin-top">
                                    <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                        视频地址
                                    </div>
                                    <div class="am-u-sm-8 am-u-md-5">
                                        <input type="text" class="am-input-sm" name="video">
                                    </div>
                                    <div class="am-hide-sm-only am-u-md-6"></div>
                                </div>
                                <div class="am-g am-margin-top">
                                    <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                        时长
                                    </div>
                                    <div class="am-u-sm-8 am-u-md-5">
                                        <input type="text" class="am-input-sm" name="time">
                                    </div>
                                    <div class="am-hide-sm-only am-u-md-6"></div>
                                </div>
                                <div class="am-g am-margin-top">
                                    <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                        排序
                                    </div>
                                    <div class="am-u-sm-8 am-u-md-5">
                                        <input type="text" class="am-input-sm" name="sort">
                                    </div>
                                    <div class="am-hide-sm-only am-u-md-6"></div>
                                </div>
                                <div class="am-g am-margin-top">
                                    <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                        免费
                                    </div>
                                    <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
                                        <label class="am-radio-inline">
                                            <input type="radio" value="1" name="free" checked> 是
                                        </label>
                                        <label class="am-radio-inline">
                                            <input type="radio" value="0" name="free"> 否
                                        </label>
                                    </div>
                                </div>
                                <div class="am-g am-margin-top">
                                    <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                        发布
                                    </div>
                                    <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
                                        <label class="am-radio-inline">
                                            <input type="radio" value="1" name="publish" checked> 是
                                        </label>
                                        <label class="am-radio-inline">
                                            <input type="radio" value="0" name="publish"> 否
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="am-tab-panel am-fade" id="tab2">
                                <div class="am-g am-margin-top-sm">
                                    <div class="am-u-sm-12 am-u-md-12">
                                        <div id="markdown">
                                            <textarea rows="10" name="body" style="display:none;"></textarea>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="am-margin">
                            <button type="submit" class="am-btn am-btn-primary am-radius">提交保存</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>

</block>
<block name="js">
    <script src="/vendor/markdown/editormd.min.js"></script>
    <script src="/vendor/admin/js/editormd_config.js"></script>
</block>